/**
 * Author: Dmitry Ustimov
 * Date: 5/15/13
 * Time: 10:24 PM
 */

package com.gmail.dmitryustimov.ms.java7.mediator.mod.example;

public class Colleague2 extends Colleague {

    public Colleague2(String name, Mediator<Colleague> mediator) {
        super(name, mediator);
        this.action = this.new EventAction();
    }

    @Override
    public Event makeChange() {
        Event event = new Event("event 2");
        System.out.println(name + " generated: " + event);
        return event;
    }

    public class EventAction implements Action<Event> {
        @Override
        public void process(Event event) {
            System.out.println(name + " is processing: " + event);
        }
    }
}
